package NPE_COND;

import java.awt.*;

public class Example {
    static void printPoint(Point p) {
        if (p == null) {
            System.err.println("p is null");
        }
        if (p.x < 0 || p.y < 0) {
            System.out.println("Invalid point");
            return;
        }
        System.out.println(p);
    }
}
